package com.wedjg.concurrency.example.singleton;

import com.wedjg.concurrency.annotations.ThreadSafe;

/**
 * 饿汉式单例
 * 安全发布对象
 * @author wedjg
 * @version 1.0
 * @date 2019/6/2
 */
@ThreadSafe
public class SingletonExample6 {

    private SingletonExample6() {
    }

    private static SingletonExample6 instance = null;

    static {
        instance = new SingletonExample6();
    }

    public static SingletonExample6 getInstance() {
        return instance;
    }
}
